package com.clwl.supervise.superviseapp.entity.supervise;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
    * 日常检查表
    */
@Data
@TableName(value = "JG_DAILY_CHECK")
//@KeySequence("JG_DAILY_CHECK_SQE")
public class JgDailyCheck implements Serializable {

    @TableId(value = "ID", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 模板id
     */
    @TableField(value = "TEMPLATE_ID")
    private Long templateId;
    /**
     * 社会评分模版Id
     */
    @TableField(value = "LIABILITY_TEMPLATE_ID")
    private Long liabilityTemplateId;

    /**
     * 监管机构id
     */
    @TableField(value = "DEPT_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deptId;

    /**
     * 	检查类型：1-日常、2-双随机、 ；6-专项检查（上级下发的非计划）
     */
    @TableField(value = "TYPE")
    private String type;


    /**
     * 监管机构名称
     */
    @TableField(value = "DEPT_NAME")
    private String deptName;

    /**
     * 检查时间
     */
    @TableField(value = "CHECK_TIME")
    private String checkTime;

    /**
     * 检查人员1id
     */
    @TableField(value = "CHECK_PERSON1_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long checkPerson1Id;

    /**
     * 检察人员1姓名
     */
    @TableField(value = "CHECK_PERSON1_NAME")
    private String checkPerson1Name;

    /**
     * 检查人员2id
     */
    @TableField(value = "CHECK_PERSON2_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long checkPerson2Id;

    /**
     * 检查人员2姓名
     */
    @TableField(value = "CHECK_PERSON2_NAME")
    private String checkPerson2Name;

    /**
     * 企业id
     */
    @TableField(value = "COMPANY_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long companyId;

    /**
     * 企业名称
     */
    @TableField(value = "COMPANY_NAME")
    private String companyName;

    /**
     * 统一会社信用代码
     */
    @TableField(value = "CREDIT_CODE")
    private String creditCode;

    /**
     * 许可证编码
     */
    @TableField(value = "LICENSE")
    private String license;

    /**
     * 企业门头照地址
     */
    @TableField(value = "COMANY_PIC")
    private String comanyPic;

    /**
     * 企业门头照缩略图
     */
    @TableField(value = "COMANY_THUMBNAIL")
    private String comanyThumbnail;

    /**
     * 告知页id
     */
    @TableField(value = "INFORM_ID")
    private Long informId;

    /**
     * 告知页url
     */
    @TableField(value = "INFORM_URL")
    private String informUrl;

    /**
     * 是否非计划：0否，1是
     */
    @TableField(value = "IS_UNPLANNED")
    private String isUnplanned;
    /**
     * 是否是临时的非计划：0否，1是
     */
    @TableField(value = "IS_TEMP_UNPLANNED")
    private String isTempUnplanned;

    /**
     * 第几次检查
     */
    @TableField(value = "CHECK_NUM")
    private Long checkNum;

    /**
     * 检查年度
     */
    @TableField(value = "CHECK_YEAR")
    private Long checkYear;

    /**
     * 检查状态：1已检查、2过期未检查、3未检查、4未到时间
     */
    @TableField(value = "CHECK_STAT")
    private String checkStat;

    /**
     * 处理结果：1通过检查，2责令整改，3调查处理
     */
    @TableField(value = "PROCESS_RESULTS")
    private String processResults;

    /**
     * 其他问题
     */
    @TableField(value = "OTHER_PROBLEM")
    private String otherProblem;

    /**
     * 监督检查要点表url
     */
    @TableField(value = "CHECK_ITEM_TABLE_URL")
    private String checkItemTableUrl;

    /**
     * 结果记录表url
     */
    @TableField(value = "RESULT_RECORD_URL")
    private String resultRecordUrl;

    /**
     * 结果记录表序号
     */
    @TableField(value = "RESULT_RECORD_INDEX")
    private Long resultRecordIndex;

    /**
     * 经营状态：0正常，1异常
     */
    @TableField(value = "MANAGE_STATUS")
    private String manageStatus;

    /**
     * 整改时间
     */
    @TableField(value = "RECTIFICATION_TIME_LIMIT")
    private String rectificationTimeLimit;

    /**
     * 延期检查：0否，1是
     */
    @TableField(value = "DELAY_CHECK")
    private Integer delayCheck;

    /**
     * 核查记录
     */
    @TableField(value = "VERIFICATION_RECORDS")
    private String verificationRecords;

    /**
     * 异常原因
     */
    @TableField(value = "ABNORMAL_CAUSE")
    private String abnormalCause;

    /**
     * 异常核查记录
     */
    @TableField(value = "ABNORMAL_VERIFICATION_RECORD")
    private String abnormalVerificationRecord;


    /**
     *  延期时限/歇业说明时限
     */
    @TableField(value = "DELAY_CHECK_DATE")
    private String delayCheckDate;

    /**
     * 创建时间
     */
    @TableField(value = "CREATE_TIME")
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField(value = "CREATOR_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long creatorId;

    /**
     * 创建人姓名
     */
    @TableField(value = "CREATOR")
    private String creator;

    /**
     * 创建人部门id
     */
    @TableField(value = "CREATE_DEPT_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createDeptId;

    /**
     * 创建人部门名称
     */
    @TableField(value = "CREATE_DEPT_NAME")
    private String createDeptName;
    /**
     * 检查结果(文字部分)
     */
    @TableField(value = "CHECK_RESULTS")
    private String checkResult;

    /**
     * 是否删除：0-否，1-是
     */
    @TableField(value = "DELETE_FLAG")
    private Long deleteFlag;

    /**
     * 模板名称
     */
    @TableField(value = "TEMPLATE_NAME")
    private String templateName;

    /**
     *  非计划检查
     */
    @TableField(value = "UNPLANNED_ID")
    private Long unplannedId;


    @TableField(exist = false)
    private List<JgDailyStandard> standardList;


    //-----一下内容为页面显示需要------------------

    /**
     *  该企业的定位信息
     */
    @TableField(exist = false )
    private String lngLat;

    /**
     *  该企业的监管部门名称
     */
    @TableField(exist = false )
    private String superviseDeptName;


    /**
     * 当前企业企业地址
     */
    @TableField(exist = false )
    private String companyAddress;

    /**
     * 当前企业品种明细
     */
    @TableField(exist = false )
    private String companyTypeName;

    /**
     * 当前企业经营范围
     */
    @TableField(exist = false )
    private String companyNatureBusiness;


    /**
     * 当前企业负责人
     */
    @TableField(exist = false )
    private String companyContact;
    /**
     * 企业监管环节
     */
    @TableField(exist = false )
    private String supProcess;

    /**
     * 检查距离
     */
    @TableField(exist = false )
    private Double distance;

    /**
     * 当前企业联系电话
     */
    @TableField(exist = false )
    private String companyContactPhone;



    private static final long serialVersionUID = 1L;


}
